package com.lvmama.client.dw;

import com.github.pagehelper.PageInfo;
import com.lvmama.pojo.dto.dw.RecommendAnalysisQuery;
import com.lvmama.pojo.entity.dw.recommend.OverView;
import com.lvmama.pojo.entity.dw.recommend.RecommendAnalysis;
import com.lvmama.pojo.entity.dw.recommend.Trend;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @param
 * @Title:
 * @Author:wangpeng
 * @Description: TODO(这里用一句话描述这个方法的作用)
 * @return
 * @throws
 */
@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface RecommendClient {

	/**
	 * 业务：数据概览
	 * 根据条件查询 ->数据概览的数据
	 * @param raDTO
	 * @return OverView
	 */
	@RequestMapping(method = RequestMethod.POST, value = "/recommend/overview", consumes = "application/json")
	OverView overview(@RequestBody RecommendAnalysisQuery raDTO);

	/**
	 * 业务：数据趋势
	 * 根据条件查询 ->数据按照日期进行分组统计,得到每一日的点击率,转换率等数据
	 * @param raDTO
	 * @return Trend
	 */
	@RequestMapping(method = RequestMethod.POST, value = "/recommend/trend", consumes = "application/json")
	Trend trend(@RequestBody RecommendAnalysisQuery raDTO);

	/**
	 * 业务：明细指标表格数据
	 * 根据条件查询 ->查询数据库中的原始数据明细
	 * @param raDTO
	 * @return PageInfo<RecommendAnalysis>
	 */
	@RequestMapping(method = RequestMethod.POST, value = "/recommend/detail", consumes = "application/json")
	PageInfo<RecommendAnalysis> detailList(@RequestBody RecommendAnalysisQuery raDTO);

	/**
	 * 根据条件导出csv的数据
	 * @param raDTO
	 * @return List<RecommendAnalysis>
	 */
	@RequestMapping(method = RequestMethod.POST, value = "/recommend/exportList", consumes = "application/json")
	List<RecommendAnalysis> exportList(@RequestBody RecommendAnalysisQuery raDTO);
}
